<!doctype html>
<html>
<head>
    <link rel="stylesheet" href="/css/base.css" type="text/css">
    <link rel="stylesheet" href="/css/admin/admin.css" type="text/css">
    <style type="text/css">
        table.list-table th, table.list-table td{
            padding: 5px !important;
        }
        h2{
            font-size:14px;
            margin: 15px 0 5px 0;
        }
        .order_head{
            font-size: 20px;
        }
        .order_head div{
            float:right;
            line-height: 60px;
            font-weight:bold;
        }
    </style>
</head>
<body>
<div class="order_head">
    <img src="/images/admin/baobaot_logo.png" style="height: 60px;"> <span style="color:#666;">发货明细</span>
    <div>订单编号: {order_helper::order_id_encode($order_info['id'])}</div>
</div>
<h2>订单详情</h2>
<table class="list-table">
    <thead>
        <tr>
            <th>订单类型</th>
            <!--<th>订单总金额/元</th>-->
            <th>商品总数量/箱</th>
            <th>收货人</th>
            <th>电话</th>
            <th>收货地址</th>
            <th>备注</th>
        </tr>
    </thead>
    <tbody>
    {$user_info = user_helper::get_user_info($order_info['user_id'])}
    <tr>
        <td>{order_config::$order_type[$order_info['type']]}</td>
        <!--<td>{$order_info['price']}</td>-->
        <td>{$order_info['goods_num']}</td>
        <td>{$user_info.realname}</td>
        <td>{$user_info.mobile}</td>
        <td>{$user_info.address}</td>
        <td>{$order_info['note']}</td>
    </tr>
    </tbody>
</table>
<table class="list-table">
    <thead>
    <tr>
        <th>订单收款时间</th>
        <th>订单收款备注</th>
        {if $order_info.task_user_id}
        <th>代理下单人</th>
        <th>代理下单备注</th>
        {/if}
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>{$order_info['confirm_money_time']}</td>
        <td>{$order_info['confirm_money_note']}</td>
        {if $order_info.task_user_id}
        <td>{user_helper::display_name($order_info.task_user_id)}</td>
        <td>{$order_info.task_desc}</td>
        {/if}
    </tr>
    </tbody>
</table>
{if $order_info['express_no']}
<table class="list-table">
    <thead>
        <tr>
            <th>物流公司</th>
            <th>物流编号</th>
            <th>备注</th>
        </tr>
    </thead>
    <tbody>
    <tr>
        <td>{$order_info['express_name']}</td>
        <td>{$order_info['express_no']}</td>
        <td>{$order_info['confirm_money_note']}</td>
    </tr>
    </tbody>
</table>
{/if}

<h2>商品详情</h2>
<table class="list-table">
    <thead>
        <th>商品名称</th>
        <!--<th>支付总价</th>-->
        <th>商品数量</th>
    </thead>
    {$relation_count = count($order_relation_list)}
    {foreach $order_relation_list as $k => $order_relation_info}
    {$goods_info = $order_relation_info.goods_info}
    <tr>
        <td>{$goods_info['title']}</td>
        <!--<td>{$order_relation_info.real_price}</td>-->
        <td>{$order_relation_info.goods_num}</td>
    </tr>
    {/foreach}
</table>


{$cup_list_count = count($cup_list_info)}
{$cup_name_list = cup_config::$cup_type}
<h2>杯子详情</h2>
<table class="list-table">
    <thead>
        <th>杯型</th>
        <th>杯数</th>
    </thead>
    {foreach $cup_list_info as $k => $v}
    <tr>
        <td>{$cup_name_list[$v['cup_type']]}</td>
        <td>{$v['cup_num']}</td>
    </tr>
    {/foreach}
    </tbody>
</table>
<!--end:列表-->
</body>
<script>
    window.print();
</script>
</html>